home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / yk211src.lha / Yak_2.11_Src / Include / handlers.h < prev    next >
C/C++ Source or Header  |  1995-10-18  |  3KB  |  107 lines

  1. /*
  2.  * YakHandler structure definition
  3.  */
  4. typedef struct {
  5.     CxObj       *CxObj;                     /* cx object list                          */
  6.     void        (*HandlerFunction)(void);   /* function to attach to CxObj             */
  7.     UWORD        State;                     /* hotkey state, 0 = not active            */
  8.     ULONG        Event;                     /* Event to use for hotkey                 */
  9.     UWORD        RequiredClicks;            /* Simple, Double or triple Click required */
  10.     UWORD        Options;                   /* Options                                 */
  11.     char        *KeyDef;                    /* actual key definition                   */
  12.     PatternData  ScreenPatternData;         /* Screens where the handler is active     */
  13. } YakHandler;
  14.  
  15.  
  16. #define NUM_HANDLERS 3
  17.  
  18. GLOBAL YakHandler MouseCyclingHandlers[NUM_HANDLERS];
  19. GLOBAL YakHandler DEF_MOUSECYCLING[NUM_HANDLERS];
  20.  
  21.  
  22. /* Short names */
  23.  
  24. #define Window_To_Front MouseCyclingHandlers[0]
  25. #define Window_To_Back  MouseCyclingHandlers[1]
  26. #define ScreenCycling   MouseCyclingHandlers[2]
  27.  
  28. /*************************/
  29. /* WindowToFront options */
  30. /*************************/
  31.  
  32. #define Opt_ScreenToFront   1
  33. #define Opt_ExcludeWbWindow 2
  34.  
  35.  
  36. /************************/
  37. /* WindowToBack options */
  38. /************************/
  39.  
  40. #define Opt_ScreenToBack    1
  41.  
  42.  
  43. /********************/
  44. /* Default settings */
  45. /********************/
  46.  
  47. #define DEF_TOFRONT_HOTKEY        "RawMouse LeftButton Mouse_LeftPress"
  48. #define DEF_TOFRONT_CLICKS        2
  49. #define DEF_TOFRONT_OPTIONS       (Opt_ScreenToFront|Opt_ExcludeWbWindow)
  50. #define WINDOW_TOFRONT_EVENT      2L
  51.  
  52. #define DEF_TOBACK_HOTKEY         "RawMouse LeftButton RButton Mouse_RightPress"
  53. #define DEF_TOBACK_CLICKS         1
  54. #define DEF_TOBACK_OPTIONS        (Opt_ScreenToBack)
  55. #define WINDOW_TOBACK_EVENT       3L
  56.  
  57. #define DEF_SCREENCYCLING_HOTKEY  "RawMouse MidButton Mouse_MiddlePress"
  58. #define DEF_SCREENCYCLING_CLICKS  2
  59. #define DEF_SCREENCYCLING_OPTIONS 0
  60. #define SCREENCYCLING_EVENT       4L
  61.  
  62. #define DEF_SCREENPATTERN {"#?", NULL}
  63.  
  64. GLOBAL ULONG clicksigflag, intuiopsigflag, blankscreensigflag, depthscreensigflag;
  65. GLOBAL void (*intui_routine)(APTR);     /* for intui_op's */
  66. GLOBAL APTR intui_parameter;
  67.  
  68.  
  69. /* for AutoActivateWindow - why? */
  70. #define SCREEN  0
  71. #define AUTO    1
  72. #define KEY     2
  73. #define RMBACT  3
  74.  
  75. /* Prototypes for functions defined in Handlers.c */
  76.  
  77. STACKARGS void MyScreenToBack(struct Screen *scr);
  78. STACKARGS void MyScreenToFront(struct Screen *scr);
  79. __regargs void ActivateMouseWindow(BYTE why);
  80. void BlankScreen(void);
  81. void UnBlankScreen(void);
  82. void BlankScreen(void);
  83. void TurnMouseOn(void);
  84. struct Screen *ScreenUnderMouse(void);
  85.  
  86. void EndMainHandler          (void);
  87. BOOL InitMainHandler         (void);
  88. VOID ToggleMouseCycling      (void);
  89. VOID FreeMouseCyclingPatterns(VOID);
  90. VOID CleanMouseCycling       (VOID);
  91. VOID InitMouseCyclingPatterns(VOID);
  92. struct Window *WindowUnderMouse(VOID);
  93. long CompatibleParseIX(char *I_Description, IX *ix);
  94.  
  95. #if defined(PREFS) || defined(CONV) 
  96. #  define WindowToFrontHandler NULL
  97. #  define WindowToBackHandler  NULL
  98. #  define ScreenCyclingHandler NULL
  99. #else
  100.    VOID WindowToFrontHandler (VOID);
  101.    VOID WindowToBackHandler  (VOID);
  102.    VOID ScreenCyclingHandler (VOID);
  103. #endif
  104.  
  105.  
  106.  
  107.